package coco.wx.com.module.question.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 选择项
 *
 * @author srx
 * @since 2020-10-23
 */
@Data
@EqualsAndHashCode
@TableName("t_m_option")
public class Option implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 选择项ID
     */
    @TableId
    private Long optionId;

    /**
     * 题目Id
     */
    private Long questionId;

    /**
     * 选择项
     */
    private String option;

    /**
     * 是否正确答案 1是
     */
    private Boolean isAnswer;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 备注
     */
    private String remark;


    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField( fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField( fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
}
